Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Environment Modules (software)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Environment_Modules_(software)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Environment_Modules_software rootpage-Environment_Modules_software skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Environment Modules (software)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1305433154">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>
<style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */


.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}


/* end https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above summary">Environment Modules</th></tr><tr><td colspan="2" class="infobox-image logo"></td></tr><tr style="display: none;"><td colspan="2" class="infobox-full-data"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">5.6.0
/ July&nbsp;31, 2025<span style="display:none">&nbsp;(<span class="bday dtstart published updated">2025-07-31</span>)</span></div></td></tr><tr style="display:none"><td colspan="2">
</td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Repository_(version_control)" title="Repository (version control)">Repository</a></th><td class="infobox-data"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */


.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}


/* end https://en.wikipedia.org/ */
</style><div class="plainlist"><ul><li><span class="url"><a rel="nofollow" class="external text" href="https://github.com/envmodules/modules">github<wbr>.com<wbr>/envmodules<wbr>/modules</a></span> </li></ul>
</div></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Written in</th><td class="infobox-data"><a href="Tcl" title="Tcl">Tcl</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Operating_system" title="Operating system">Operating system</a></th><td class="infobox-data"><a href="Unix-like" title="Unix-like">Unix-like</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="GNU_General_Public_License#Version_2" title="GNU General Public License">GNU General Public License#Version 2</a></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="https://modules.sourceforge.net/">modules<wbr>.sourceforge<wbr>.net</a></span></td></tr></tbody></table>
<p>The <b>Environment Modules</b> system is a <a href="Software_tool" class="mw-redirect" title="Software tool">software tool</a> to help users manage their <a href="Unix" title="Unix">Unix</a> or <a href="Linux" title="Linux">Linux</a> <a href="Shell_(computing)" title="Shell (computing)">shell</a> environment, by allowing groups of related <a href="Environment-variable" class="mw-redirect" title="Environment-variable">environment-variable</a> settings to be made or removed dynamically.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Development">Development</h2></div>
<p>Modules has been around since the early 1990s<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> and is used at some of the largest computer centers<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> to deploy multiple versions of different software tools to users. The <a href="National_Energy_Research_Scientific_Computing_Center" title="National Energy Research Scientific Computing Center">National Energy Research Scientific Computing Center</a> (NERSC) reports that they use Environment Modules to manage nearly all software.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> Environment Modules is specified as a Baseline Configuration requirement of the <a href="DoD" class="mw-redirect" title="DoD">DoD</a> <a href="High_Performance_Computing_Modernization_Program" title="High Performance Computing Modernization Program">High Performance Computing Modernization Program</a> (HPCMP)<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> Project Baseline Configuration<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> team for participating DoD Supercomputing Resource Centers (DSRCs).
</p>
<div class="mw-heading mw-heading2"><h2 id="Modulefiles">Modulefiles</h2></div>
<p>The modules system is based on modulefiles,<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> which specify groups of environment settings that need to be made together. Modulefiles can be installed in a central location for general use, or in a user directory for personal use. Environment Modules modulefiles are written in the <a href="Tcl" title="Tcl">Tcl</a> (Tool Command Language) and are interpreted by the modulecmd program via the module<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> user interface.
</p><p>The key advantage of Environment Modules is that it is shell independent and supports all major shells such as <a href="Bash_(Unix_shell)" title="Bash (Unix shell)">Bash</a> (bash), <a href="KornShell" title="KornShell">KornShell</a> (ksh), <a href="Z_shell" title="Z shell">Z shell</a> (zsh), <a href="Fish_(Unix_shell)" title="Fish (Unix shell)">Fish</a> (fish), <a href="Bourne_shell" title="Bourne shell">Bourne shell</a> (sh), <a href="Tcsh" title="Tcsh">tcsh</a>, and <a href="C_shell" title="C shell">C shell</a> (csh). The second key advantage is that it allows to use multiple versions of the program or package from the same account by just loading proper module. Those two advantages were instrumental in making Environment Modules a part of most HPC cluster setups. It also inspired several alternative implementation such as lmod from University of Texas, which is written in <a href="Lua_(programming_language)" class="mw-redirect" title="Lua (programming language)">Lua</a> instead of Tcl.
</p><p>Modulefiles are created on per application per version basis. They can be dynamically loaded, unloaded, or switched. Along with the capability of using multiple versions of the same software it also can be used to implement site policies regarding the access and use of applications.
</p>
<div class="mw-heading mw-heading3"><h3 id="Default_modulefiles_directory">Default modulefiles directory</h3></div>
<p>The default modules search path is in a hidden configuration file you can display with:
</p>
<div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span class="gp">$ </span>cat<span class="w"> </span><span class="si">${</span><span class="nv">MODULESHOME</span><span class="si">}</span>/init/.modulespath
<span class="go">/etc/modulefiles # CentOS, Scientific Linux, RHEL</span>
<span class="go">/usr/local/Modules/modulefiles # Build from source default</span>
</pre></div>
<p>The <style data-mw-deduplicate="TemplateStyles:r886049734">
/* start https://en.wikipedia.org/ */


.mw-parser-output .monospaced{font-family:monospace,monospace}


/* end https://en.wikipedia.org/ */
</style><span class="monospaced">/etc/modulefiles</span> directory used by some distributions (or any other directory) can be used after a build from source by modifying the <span class="monospaced">${MODULESHOME}/init/.modulespath</span> file.
</p>
<div class="mw-heading mw-heading3"><h3 id="Add_your_own_modules_to_the_path">Add your own modules to the path</h3></div>
<p>The <span class="monospaced">${MODULESHOME}/modulefiles/<b>use.own</b></span> module essentially performs these steps:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre>mkdir<span class="w"> </span><span class="nv">$HOME</span>/privatemodules
cp<span class="w"> </span><span class="si">${</span><span class="nv">MODULESHOME</span><span class="si">}</span>/modulefiles/null<span class="w"> </span><span class="nv">$HOME</span>/privatemodules
module<span class="w"> </span>use<span class="w"> </span>--append<span class="w"> </span><span class="nv">$HOME</span>/privatemodules
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Use_a_version_file_within_a_hierarchical_organization">Use a version file within a hierarchical organization</h3></div>
<p>The commands in this section require read/write/execute access to the <span class="monospaced">/etc/modulefiles</span> directory. The <span class="monospaced">$HOME/privatemodules</span> or another directory can be used instead along with "<span class="monospaced">module use --append</span>" or modification of the configuration file specifying the default modules search path.
</p><p>The default <span class="monospaced">modulefiles</span> directory is empty initially. Copy the null module to the default modulefiles directory to have it shown by "module avail". The following uses the null and module-info modules to show use of a version file within a hierarchical organization and their effect on module avail and module show:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre>mkdir<span class="w"> </span>/etc/modulefiles/test
cp<span class="w"> </span><span class="si">${</span><span class="nv">MODULESHOME</span><span class="si">}</span>/modulefiles/null<span class="w"> </span>/etc/modulefiles/test/2.0
cp<span class="w"> </span><span class="si">${</span><span class="nv">MODULESHOME</span><span class="si">}</span>/modulefiles/module-info<span class="w"> </span>/etc/modulefiles/test/1.0
module<span class="w"> </span>avail
module<span class="w"> </span>show<span class="w"> </span><span class="nb">test</span>
</pre></div>
<p>Set the first version as the default:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span class="nb">echo</span><span class="w"> </span><span class="s1">'#%Module'</span><span class="w"> </span>&gt;<span class="w"> </span>/etc/modulefiles/test/.version
<span class="nb">echo</span><span class="w"> </span><span class="s1">'set ModulesVersion "1.0"'</span><span class="w"> </span>&gt;&gt;<span class="w"> </span>/etc/modulefiles/test/.version
module<span class="w"> </span>avail
module<span class="w"> </span>show<span class="w"> </span><span class="nb">test</span>
module<span class="w"> </span>show<span class="w"> </span>test/2.0
</pre></div>
<p>Switch to the newer version as the default with:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre>rm<span class="w"> </span>/etc/modulefiles/test/.version
<span class="nb">echo</span><span class="w"> </span><span class="s1">'#%Module'</span><span class="w"> </span>&gt;<span class="w"> </span>/etc/modulefiles/test/.version
<span class="nb">echo</span><span class="w"> </span><span class="s1">'set ModulesVersion "2.0"'</span><span class="w"> </span>&gt;&gt;<span class="w"> </span>/etc/modulefiles/test/.version
module<span class="w"> </span>avail
module<span class="w"> </span>show<span class="w"> </span><span class="nb">test</span>
</pre></div>
<p>After the above following a fresh install from source you would see:
</p>
<div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span class="gp">$ </span>module<span class="w"> </span>avail

<span class="go">-------------------- /usr/local/Modules/3.2.10/modulefiles ---------------------</span>
<span class="go">dot module-git module-info modules null use.own</span>

<span class="go">------------------------------- /etc/modulefiles -------------------------------</span>
<span class="go">null test/1.0 test/2.0(default)</span>

<span class="go">--------------------------- /home/user/privatemodules --------------------------</span>
<span class="go">null</span>

<span class="gp">$ </span>module<span class="w"> </span>show<span class="w"> </span><span class="nb">test</span>
<span class="go">-------------------------------------------------------------------</span>
<span class="go">/etc/modulefiles/test/2.0:</span>

<span class="go">module-whatis does absolutely nothing </span>
<span class="go">-------------------------------------------------------------------</span>

<span class="gp">$ </span>module<span class="w"> </span>show<span class="w"> </span>test/1.0
<span class="go">-------------------------------------------------------------------</span>
<span class="go">/etc/modulefiles/test/1.0:</span>

<span class="go">module-whatis returns all various module-info values </span>
<span class="go">+++ module-info +++++++++++++++++++++++++++++++</span>
<span class="go">flags = 2</span>
<span class="go">mode = display</span>
<span class="go">name = test/1.0</span>
<span class="go">specified = test/1.0</span>
<span class="go">shell = bash</span>
<span class="go">shelltype = sh</span>
<span class="go">version = test/1.0</span>
<span class="go">user = advanced</span>
<span class="go">trace = 0</span>
<span class="go">tracepat = -.*</span>
<span class="go">symbols = *undef*</span>
<span class="go">+++ info ++++++++++++++++++++++++++++++++++++++</span>
<span class="go">hostname = localhost</span>
<span class="go">level = 1</span>
<span class="go">loaded null = 0</span>
<span class="go">library = /usr/local/lib/tcl8.6</span>
<span class="go">nameofexecutable =</span>
<span class="go">sharedlibextension = .so</span>
<span class="go">tclversion = 8.6</span>
<span class="go">patchlevel = 8.6.1</span>
<span class="go">+++++++++++++++++++++++++++++++++++++++++++++++</span>
<span class="go">-------------------------------------------------------------------</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Automatic_modules_initialization">Automatic modules initialization</h2></div>
<p>Environment Modules on <a href="Scientific_Linux" title="Scientific Linux">Scientific Linux</a>, <a href="CentOS" title="CentOS">CentOS</a>, and <a href="Red_Hat_Enterprise_Linux" title="Red Hat Enterprise Linux">Red Hat Enterprise Linux</a> distributions in the environment-modules package include <span class="monospaced">modules.csh</span> and <span class="monospaced">modules.sh</span> scripts for the <span class="monospaced">/etc/profile.d</span> directory that make modules initialization part of the default shell initialization. One of the advantages of Environment Modules is a single modulefile that supports bash, ksh, zsh, sh as well as tcsh and csh shell users for environment setup and initialization. This makes managing complex environments a bit less complicated.
</p><p>For a source build the automation for all users can be manually configured.
</p>
<div class="mw-heading mw-heading3"><h3 id="bash,_ksh,_zsh,_sh_automatic_modules_initialization">bash, ksh, zsh, sh automatic modules initialization</h3></div>
<p><span class="monospaced">/etc/profile.d/modules.sh</span> from the <span class="monospaced">etc/global/profile.modules</span> file in the 3.2.10 modules build directory.
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span class="nb">trap</span><span class="w"> </span><span class="s2">""</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="m">3</span>

<span class="k">case</span><span class="w"> </span><span class="s2">"</span><span class="nv">$0</span><span class="s2">"</span><span class="w"> </span><span class="k">in</span>
<span class="w"> </span>-bash<span class="p">|</span>bash<span class="p">|</span>*/bash<span class="o">)</span><span class="w"> </span>.<span class="w"> </span>/usr/local/Modules/default/init/bash<span class="w"> </span><span class="p">;;</span><span class="w"> </span>
<span class="w"> </span>-ksh<span class="p">|</span>ksh<span class="p">|</span>*/ksh<span class="o">)</span><span class="w"> </span>.<span class="w"> </span>/usr/local/Modules/default/init/ksh<span class="w"> </span><span class="p">;;</span><span class="w"> </span>
<span class="w"> </span>-zsh<span class="p">|</span>zsh<span class="p">|</span>*/zsh<span class="o">)</span><span class="w"> </span>.<span class="w"> </span>/usr/local/Modules/default/init/zsh<span class="w"> </span><span class="p">;;</span>
<span class="w"> </span>*<span class="o">)</span><span class="w"> </span>.<span class="w"> </span>/usr/local/Modules/default/init/sh<span class="w"> </span><span class="p">;;</span><span class="w"> </span><span class="c1"># default</span>
<span class="k">esac</span>

<span class="nb">trap</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="m">3</span>
</pre></div>
<p>Copy the <span class="monospaced">etc/global/profile.modules</span> file from the 3.2.10 modules build directory to the system initialization directory:
</p>
<div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span class="gp">$ </span>sudo<span class="w"> </span>cp<span class="w"> </span>etc/global/profile.modules<span class="w"> </span>/etc/profile.d/modules.sh
</pre></div>
<p>Add a version 3.2.10 symbolic link for the above generic addresses:
</p>
<div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr"><pre><span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>/usr/local/Modules
<span class="gp">$ </span>sudo<span class="w"> </span>ln<span class="w"> </span>-sT<span class="w"> </span><span class="m">3</span>.2.10<span class="w"> </span>default
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="tcsh,_csh_automatic_modules_initialization">tcsh, csh automatic modules initialization</h3></div>
<p>A <span class="monospaced">/etc/profile.d/modules.csh</span> symbolic link to the <span class="monospaced">etc/global/profile.modules</span> file in the 3.2.10 modules build directory can enable automatic modules initialization for these users.
</p>
<div class="mw-heading mw-heading2"><h2 id="Installing_on_Linux">Installing on Linux</h2></div>
<div class="mw-heading mw-heading3"><h3 id="yum_and_rpm">yum and rpm</h3></div>
<p>On Scientific Linux, CentOS, and RHEL distributions Environment Modules is in the environment-modules package which can be installed with:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre>sudo<span class="w"> </span>yum<span class="w"> </span>install<span class="w"> </span>environment-modules
</pre></div>
<p>Once installed the package information can be viewed with:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre>rpm<span class="w"> </span>-qi<span class="w"> </span>environment-modules
rpm<span class="w"> </span>-ql<span class="w"> </span>environment-modules
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="apt_and_dpkg">apt and dpkg</h3></div>
<p>On <a href="Ubuntu" title="Ubuntu">Ubuntu</a> or systems using <a href="Apt-get" class="mw-redirect" title="Apt-get">apt-get</a>, Environment Modules can be installed with:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre>sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>environment-modules
</pre></div>
<p>Once installed the package information can be viewed with:
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre>dpkg<span class="w"> </span>-L<span class="w"> </span>environment-modules
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Linux_from_source">Linux from source</h3></div>
<p>Although installing from a <a href="Linux_distributions" class="mw-redirect" title="Linux distributions">Linux distributions</a> repository using that distributions update manager is the easiest the software can be installed from source. Resolve dependencies is the most difficult task for an installation from source. The typical configure, make, install cycle can become painfully slow as each configure improvement reveals another dependency not available in your default environment. This section includes the steps to install the Environment Modules package on source including compiling the Tcl from source as a dependency.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="8.6.1_version_of_Tcl_built_from_/usr/local/src">8.6.1 version of Tcl built from /usr/local/src</h4></div>
<p>Although the <a href="PCLinuxOS" title="PCLinuxOS">PCLinuxOS</a> 64-bit repositories include Tcl they do not include a development package with the configuration files required to build Environment Modules on Linux from source. Building Tcl from source will make the required files available.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p><p>Extract source after downloading
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span class="nb">cd</span><span class="w"> </span>/usr/local/src
tar<span class="w"> </span>-xvzf<span class="w"> </span>~/Downloads/tcl8.6.1-src.tar.gz
</pre></div>
<p>Configure, make, install
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span class="nb">cd</span><span class="w"> </span>/usr/local/src/tcl8.6.1
unix/configure
make
sudo<span class="w"> </span>make<span class="w"> </span>install
</pre></div>
<div class="mw-heading mw-heading4"><h4 id="3.2.10_version_of_modules_built_from_/usr/local/src">3.2.10 version of modules built from /usr/local/src</h4></div>
<p>Extract source after downloading
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span class="nb">cd</span><span class="w"> </span>/usr/local/src
tar<span class="w"> </span>-xvzf<span class="w"> </span>~/Downloads/modules-3.2.10.tar.gz
</pre></div>
<p>Configure, make, install
</p>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span class="nb">cd</span><span class="w"> </span>/usr/local/src/modules-3.2.10
<span class="nv">CPPFLAGS</span><span class="o">=</span><span class="s2">"-DUSE_INTERP_ERRORLINE"</span><span class="w"> </span>./configure
make
sudo<span class="w"> </span>make<span class="w"> </span>install
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFFurlani1991" class="citation journal cs1">Furlani, John L. (September 30 – October 3, 1991). <a rel="nofollow" class="external text" href="https://modules.sourceforge.net/docs/Modules-Paper.pdf">"Modules: Providing a Flexible User Environment"</a> <span class="cs1-format">(PDF)</span>. <i>Proceedings of the Fifth Large Installation Systems Administration Conference (LISA V)</i>. San Diego, CA: <span class="nowrap">141–</span>152<span class="reference-accessdate">. Retrieved <span class="nowrap">9 February</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140222062335/http://www.nics.tennessee.edu/computing-resources/kraken/modules">"NICS User Support Kraken Modules Description"</a>. <i>The National Institute for Computational Sciences (NICS)</i>. Oak Ridge National Laboratory - Department of Energy. 22 May 2011. Archived from <a rel="nofollow" class="external text" href="http://www.nics.tennessee.edu/computing-resources/kraken/modules">the original</a> on 22 February 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">9 February</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.nersc.gov/users/software/nersc-user-environment/modules/">"NERSC Modules Software Environment"</a>. <i>The National Energy Research Scientific Computing Center (NERSC)</i>. Office of Science - Department of Energy. 2014-02-07<span class="reference-accessdate">. Retrieved <span class="nowrap">19 February</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140222063501/http://centers.hpc.mil/consolidated/bc/policies.php?choice=modules">"Use of Modules for Accessing Multiple Versions of Software"</a>. <i>Baseline Configuration</i>. DoD High Performance Computing Modernization Program (HPCMP). 20 Mar 2008. Archived from <a rel="nofollow" class="external text" href="https://centers.hpc.mil/consolidated/bc/policies.php?choice=modules">the original</a> on 22 February 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">9 February</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140222063504/http://centers.hpc.mil/consolidated/bc/index.php">"DoD High Performance Computing Modernization Program Baseline Configuration"</a>. <i>Baseline Configuration</i>. DoD High Performance Computing Modernization Program (HPCMP). Archived from <a rel="nofollow" class="external text" href="https://centers.hpc.mil/consolidated/bc/index.php">the original</a> on 22 February 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">9 February</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://modules.readthedocs.io/en/stable/modulefile.html">"modulefile"</a>. <i>Read the Docs</i>. 31 July 2025.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://modules.readthedocs.io/en/stable/module.html">"module"</a>. <i>Read the Docs</i>. 31 July 2025.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external free" href="http://nickgeoghegan.net/linux/installing-environment-modules">http://nickgeoghegan.net/linux/installing-environment-modules</a></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://sourceforge.net/projects/tcl/files/Tcl/">"TCL - Browse /TCL at SourceForge.net"</a>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1266661725">
/* start https://en.wikipedia.org/ */


.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}


/* end https://en.wikipedia.org/ */
</style>
<ul><li><span class="official-website"><span class="url"><a rel="nofollow" class="external text" href="https://modules.sourceforge.net/">Official website</a></span></span></li>
<li><a rel="nofollow" class="external text" href="https://github.com/envmodules/modules">modules</a> on <a href="GitHub" title="GitHub">GitHub</a></li>
<li>John L. Furlani, <a rel="nofollow" class="external text" href="https://modules.sourceforge.net/docs/Modules-Paper.pdf">Modules: Providing a Flexible User Environment</a> <i>Proceedings of the Fifth Large Installation Systems Administration Conference (LISA V)</i>, pp.&nbsp;141–152, San Diego, CA, September 30 - October 3, 1991.</li>
<li><a rel="nofollow" class="external free" href="http://lmod.sourceforge.net">http://lmod.sourceforge.net</a> - alternative implementation using Lua instead of Tcl</li>
<li><a rel="nofollow" class="external free" href="http://www.lysator.liu.se/cmod/">http://www.lysator.liu.se/cmod/</a> - alternative implementation using C only</li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140203041538/http://rcc.its.psu.edu/user_guides/system_utilities/modules/">PennState Environment Modules User Guide</a></li>
<li><a rel="nofollow" class="external text" href="https://modules.sourceforge.net/docs/MC2_whitney_paper.pdf">Drag your design environment kicking and screaming into the '90s with Modules!</a> - SNUB Boston 2001 - Erich Whitney, Axiowave Networks, Mark Sprague, ATI Research</li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20150217180220/https://www.xsede.org/software-environments">Xsede Software Environments</a>. The Extreme Science and Engineering Discovery Environment ― National Science Foundation</li>
<li><a rel="nofollow" class="external text" href="http://www.nics.tennessee.edu/computing-resources/modules">NICS Modules Description</a> ― The National Institute for Computational Sciences at Oak Ridge National Laboratory ― Department of Energy</li>
<li><a rel="nofollow" class="external text" href="https://www.tacc.utexas.edu/research-development/tacc-projects/lmod">Lmod</a> ― <a href="Lua_(programming_language)" class="mw-redirect" title="Lua (programming language)">Lua</a>-based module system</li>
<li><a rel="nofollow" class="external text" href="https://spack.io/">Spack</a> ― Package Manager for HPC Software developed at <a href="Lawrence_Livermore_National_Laboratory" title="Lawrence Livermore National Laboratory">Lawrence Livermore National Laboratory</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-07" href="https://en.wikipedia.org/wiki/?title=Environment_Modules_(software)&amp;oldid=1304632194">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>